package com.blb.aop.service.impl;

import com.blb.aop.dao.StudentDao;
import com.blb.aop.dao.impl.StudentDaoImpl;
import com.blb.aop.entity.Student;
import com.blb.aop.service.StudentService;
import org.springframework.stereotype.Service;

@Service
public class StudentServiceImpl implements StudentService {

    private StudentDao studentDao=new StudentDaoImpl();

    @Override
    public void save(Student student) {
        studentDao.insert(student);
    }

    @Override
    public void modify(Student student) {
        studentDao.update(student);
    }

    @Override
    public void remove(Long id) {
        studentDao.delete(id);
    }

    @Override
    public Student findById(Long id) {
        Student student = studentDao.selectById(id);
        return student;
    }
}
